package com.hp.controller;

import com.hp.pojo.Admin;
import com.hp.service.LoginService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.Map;

@RestController
public class AdminController {
    @Autowired private LoginService loginService;

    @PostMapping("/LoginConfirm")
    public Map<String,Object> LoginConfirm(int userId,String passWord){
        return loginService.loginConfirm(userId,passWord);
    }

    @PostMapping("/getAdminNameById")
    public Map<String,Object> getAdminNameById(int adminId){
        return loginService.getAdminNameById(adminId);
    }

    @PostMapping("/ModifyPassWord")
    public Map<String,Object> ModifyPassWord(int adminId,String newPassword){
        return loginService.ModifyPassWord(adminId,newPassword);
    }
}
